<?php
include_once ("mysqllib.php");

//Id of the video we want the slides
$idVideo = $_GET['id'];

//connect to the database
$db = new mysqllib();

//Get all the slides of the video
$query = "SELECT * FROM Slide WHERE idVideo=$idVideo ORDER BY time ASC";
$result = mysql_query($query);

$returnString = "";
//write all results in a string to be returned to the javascript
while (($data = mysql_fetch_array($result))) {
	$returnString .= $data['time'] . ",";
	$returnString .= $data['type'] . ",";
	$returnString .= $data['filePath'] . "|";
}

echo $returnString;
?>